<?php
namespace app\admin\controller;
use think\Controller;
use think\Controllers;

use think\Session;
use think\Cookie;
use think\Jump;
use think\Db;
class Poster extends Controllers{

	public function index(){
    $pindex = max(1, intval($_GPC['page']));
    $psize = 20;
    $sql = 'select id,name,createtime from ims_xuan_zy_poster_data  where uniacid=2  ORDER BY ID DESC';
    $sql.= " limit " . ($pindex - 1) * $psize . ',' . $psize;
    $list = DB::query($sql);
    foreach ($list as $key => &$value) {
    	$value['createtime'] = date("Y-m-d H:i:s",$value['createtime']);
    }
    $this->assign("list",$list);
    return $this->fetch("admin/poster");
	}
	public function add(){
    return $this->fetch("admin/poster_add");


	}
}